<ul class="nav navbar-nav navbar-left">
	<li><a href="/"><span class="glyphicon glyphicon-home"></span> Главная</a></li>

	{% if _permis_tree %}
		{% if _permis_tree.client %}
			<li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
					<span class="glyphicon glyphicon-user"></span> Личный кабинет
					<span class="caret"></span>
				</a>
				<ul class="dropdown-menu" role="menu">
					<li>
						<a href="/user/settings/"><span class="glyphicon glyphicon-cog"></span> Настройки</a>
					</li>
				</ul>
			</li>
		{% endif %}

		{% if _permis_tree.admin %}
			<li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
					<span class="glyphicon glyphicon-wrench"></span> Администрирование
					<span class="caret"></span>
				</a>
				<ul class="dropdown-menu" role="menu">
					<li>
						<a href="/admin/orders/"><span class="glyphicon glyphicon-briefcase"></span> Заказы</a>
					</li>
					<li class="divider"></li>

					{% if _permis_tree.admin.backup %}
						<li>
							<a href="/admin/backup/"><span class="glyphicon glyphicon-compressed"></span> Резервное копирование / Восстановление</a>
						</li>
					{% endif %}
					{% if _permis_tree.admin.users %}
						<li><a href="/admin/users/"><span class="glyphicon glyphicon-user"></span> Пользователи</a>
						</li>
					{% endif %}

				</ul>
			</li>
		{% endif %}
		<li><a href="?logout"><span class="glyphicon glyphicon-off"></span> Выход</a></li>
	{% else %}
		<li><a href="/login"><span class="glyphicon glyphicon-log-in"></span> Вход</a></li>
	{% endif %}
</ul>
